package com.ruoyi.wq.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.wq.domain.WqUserCard;
import com.ruoyi.wq.domain.vo.WqUserCardVO;
import com.ruoyi.wq.mapper.WqUserCardMapper;
import com.ruoyi.wq.service.IWqUserCardService;

/**
 * 用户卡片Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-01-28
 */
@Service
public class WqUserCardServiceImpl extends ServiceImpl<WqUserCardMapper, WqUserCard> implements IWqUserCardService {
	
    @Autowired
    private WqUserCardMapper wqUserCardMapper;
    
    /**
     * 查询用户卡片
     * 
     * @param id 用户卡片主键
     * @return 用户卡片
     */
    @Override
    public WqUserCard selectWqUserCardById(String id)
    {
        return wqUserCardMapper.selectWqUserCardById(id);
    }

    /**
     * 查询用户卡片列表
     * 
     * @param wqUserCard 用户卡片
     * @return 用户卡片
     */
    @Override
    public List<WqUserCard> selectWqUserCardList(WqUserCard wqUserCard)
    {
        return wqUserCardMapper.selectWqUserCardList(wqUserCard);
    }

    /**
     * 修改用户卡片
     * 
     * @param wqUserCard 用户卡片
     * @return 结果
     */
    @Override
    public int updateWqUserCard(WqUserCard wqUserCard)
    {
        wqUserCard.setUpdateTime(DateUtils.getNowDate());
        return wqUserCardMapper.updateWqUserCard(wqUserCard);
    }

    /**
     * 批量删除用户卡片
     * 
     * @param ids 需要删除的用户卡片主键
     * @return 结果
     */
    @Override
    public int deleteWqUserCardByIds(String[] ids)
    {
        return wqUserCardMapper.deleteWqUserCardByIds(ids);
    }

    /**
     * 删除用户卡片信息
     * 
     * @param id 用户卡片主键
     * @return 结果
     */
    @Override
    public int deleteWqUserCardById(String id)
    {
        return wqUserCardMapper.deleteWqUserCardById(id);
    }

	@Override
	public List<SysUser> getCardUserListByUserId(WqUserCardVO userCardVO) {
		return wqUserCardMapper.getCardUserListByUserId(userCardVO);
	}

}
